/* time example */
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <algorithm>
using namespace std;

int a[100000000];
int n;

void insertsort(int p, int q)
{ for(int i=p+1; i<=q; i++)
  { int x = a[i];
    int j = i-1;
    while(j>=p && a[j]>x)
    { a[j+1] = a[j];
      j--;
    }
    a[j+1] = x;
  }
}

void show(int p, int q)
{ for(int i=p; i<=q; i++)
    cout << a[i] << " ";
  cout << endl;  
}


int main ()
{
  time_t s,t;

  cout << "n = ";
  cin >> n;
  
  for(int i=0; i<n; i++)
    a[i] = rand();
  
//  show(0,n-1);
  
  cout << "Start" << endl;
  s = time(NULL);
  
//  insertsort(0,n-1);
  sort(a,a+n);
  
  t = time(NULL);
  cout << "End" << endl;
  cout << t - s << endl;
  
// show(0,n-1);
  return 0;
}
